﻿using Synthesize.BaseSet.Domain.Aggregation.Entity.Authority;
using Synthesize.BaseSet.Domain.Repository.Authority;
using System;

namespace Synthesize.BaseSet.Domain.Factory.Authority
{
    public class DepartmentFactory
    {
        private readonly IDepartmentRepository _departmentRepository;

        public DepartmentFactory(IDepartmentRepository departmentRepository)
        {
            _departmentRepository = departmentRepository;
        }
        public  DepartmentInfoEntity CreateAsync(string departmentName,Guid? parentId,decimal sort)
        {
            var department = new DepartmentInfoEntity()
            {
                Name = departmentName,
                ParentId = parentId,
                Sort= sort
            };
            return department;
        }
    }
}
